Skip to content

Commit

Permalink
hack to fix data sending on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
arpruss committed Jun 26, 2016
1 parent dd2581d commit b85792d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
Binary file modified python2-scripts.zip
Binary file not shown.
7 changes: 3 additions & 4 deletions python2-scripts/mcpipy/mcpi/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ def __del__(self):

def close(self):
try:
self.readFile.close()
except:
pass
try:
if platform.system() == "Windows":
# ugly hack to block until all sending is completed
self.sendReceive("world.getBlock",0,0,0)
self.socket.close()
except:
pass
Expand Down
Binary file modified python3-scripts.zip
Binary file not shown.
7 changes: 3 additions & 4 deletions python3-scripts/mcpipy/mcpi/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ def __del__(self):

def close(self):
try:
self.readFile.close()
except:
pass
try:
if platform.system() == "Windows":
# ugly hack to block until all sending is completed
self.sendReceive("world.getBlock",0,0,0)
self.socket.close()
except:
pass
Expand Down

0 comments on commit b85792d

Please sign in to comment.