Skip to content
Browse files

Tweaking the patch to only affect socket shutdown and close. Ref: #242

  • Loading branch information...
1 parent 95da7f3 commit c627b7214bf244ddb0ca4d6d5c7f5e41e63c6722 @vishnugopal committed Aug 25, 2011
Showing with 8 additions and 3 deletions.
  1. +8 −3 ext/ed.cpp
View
11 ext/ed.cpp
@@ -174,10 +174,15 @@ void EventableDescriptor::Close()
*/
// Close the socket right now. Intended for emergencies.
- if (MySocket != INVALID_SOCKET && MySocket > 2 && !bWatchOnly) {
+ if (MySocket != INVALID_SOCKET && !bWatchOnly) {
@pbozeman
pbozeman added a note Aug 25, 2011

remove !bWatchOnly from here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
MyEventMachine->Closing (this);
- shutdown (MySocket, 1);
- close (MySocket);
+
+ // Do not close STDIN, STDOUT, STDERR
+ if (MySocket > 2) {
@pbozeman
pbozeman added a note Aug 25, 2011

and add !bWatchOnly to here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ shutdown (MySocket, 1);
+ close (MySocket);
+ }
+
MySocket = INVALID_SOCKET;
}
}

0 comments on commit c627b72

Please sign in to comment.
Something went wrong with that request. Please try again.