mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
Handle EEXIST error when starting the server
Reviewed By: @cpojer Differential Revision: D2426373
This commit is contained in:
committed by
facebook-github-bot-7
parent
3ee65225be
commit
3cfac35fd8
@@ -148,7 +148,7 @@ class SocketServer {
|
|||||||
process.send({ type: 'createdServer' });
|
process.send({ type: 'createdServer' });
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
if (error.code === 'EADDRINUSE') {
|
if (error.code === 'EADDRINUSE' || error.code === 'EEXIST') {
|
||||||
// Server already listening, this may happen if multiple
|
// Server already listening, this may happen if multiple
|
||||||
// clients where started in quick succussion (buck).
|
// clients where started in quick succussion (buck).
|
||||||
process.send({ type: 'createdServer' });
|
process.send({ type: 'createdServer' });
|
||||||
|
|||||||
Reference in New Issue
Block a user