Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netbeans session not terminated on Windows after socket closed #107

Open
GoogleCodeExporter opened this issue Aug 18, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Apr 20 2012 21:18:56)
Included patches: 1-502

Steps to reproduce:
    * start the following netbeans.py server with python 3 (or adapt netbeans.py
      for python 2)
    * start a vim instance and issue the command ':nbstart'
    * after netbeans.py has terminated, the command
      ':echo has("netbeans_enabled")' still prints '1'
    * one must run first ':nbclose' to start a new netbeans session on this vim
      instance

The problem does not happen on linux.

===   netbeans.py   =======================================
import socket

# Start this script with python3, then run ":nbstart" in Vim.
HOST = ''
PORT = 3219
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR,
        s.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) | 1)
s.bind((HOST, PORT))
s.listen(1)
conn, addr = s.accept()
print('Connected by', addr)
while 1:
    data = conn.recv(1024)
    # python2: msg = data
    msg = data.decode()
    print(msg)
    if 'startupDone' in msg:
        break
print('Closing.')
conn.close()
===========================================================


Original issue reported on code.google.com by xdeg...@gmail.com on 28 Jan 2013 at 5:50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant