From 97c926f92c218f54346b9d6ecc08032fd12218a8 Mon Sep 17 00:00:00 2001
From: Romain CARNUS <romain.carnus@oppida.fr>
Date: Mon, 15 Aug 2016 20:29:53 +0200
Subject: [PATCH] Fixed a bug in the sendrecv method when using multithreading

---
 scapy/sendrecv.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scapy/sendrecv.py b/scapy/sendrecv.py
index 474bcccd..7ecf4f5c 100644
--- a/scapy/sendrecv.py
+++ b/scapy/sendrecv.py
@@ -10,7 +10,7 @@ Functions to send and receive packets.
 import errno
 import cPickle,os,sys,time,subprocess
 import itertools
-from select import select
+from select import select,error
 from scapy.data import *
 from scapy import arch
 from scapy.config import conf
@@ -132,6 +132,8 @@ def sndrcv(pks, pkt, timeout = None, inter = 0, verbose=None, chainCC=0, retry=0
                                 inp = []
                                 try:
                                     inp, out, err = select(inmask,[],[], remaintime)
+                                except error as e:
+                                    continue
                                 except IOError, exc:
                                     if exc.errno != errno.EINTR:
                                         raise
-- 
GitLab